import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui';
Vue.use(uView);
// 引入个人定义js文件
import tools from '@/common/common.js'
// 自定义tools
Vue.prototype.$tools = tools;

Vue.config.productionTip = false
App.mpType = 'app'

import * as request from "@/require/request.js";
Vue.prototype.$http = request;

let vuexStore = require('@/store/$my.mixin.js')
Vue.mixin(vuexStore)

import store from '@/store'
const app = new Vue({
	store,
	...App
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/require/http.interceptor.js';
Vue.use(httpInterceptor, app);

import loginPopup from '@/components/login-popup.vue'
Vue.component('loginPopup', loginPopup)

app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif